<?php

namespace Controller\Server;

use Controller\Controller;
use Response\JsonResponse;

class NotificationController extends Controller
{
    public function orderCreated($order_id)
    {
        \Channel\Client::publish('broadcast', [
            'event' => 'orderCreated',
            'type' => 1,
            'payload' => [
                'order_id' => $order_id
            ]
        ]);

        return new JsonResponse(200, 0, 'OK');
    }
}
